<?php

namespace shopend\assets;

use common\service\GlobalUrlService;
use yii\web\AssetBundle;

class ShopAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [];
    public $js = [];

    public function registerAssetFiles($view){
        $release_version = defined("RELEASE_VERSION") ? RELEASE_VERSION : time();
        // 这里注册公共的样式
        $this->css = [
            GlobalUrlService::buildShopStaticUrl('/css/bootstrap/css/bootstrap.min.css'),
            GlobalUrlService::buildShopStaticUrl('/css/bootstrap/css/bootstrap-responsive.min.css'),
            GlobalUrlService::buildShopStaticUrl('/css/font-awesome/css/font-awesome.min.css'),
            GlobalUrlService::buildShopStaticUrl('/css/style.css'),
            GlobalUrlService::buildShopStaticUrl('/css/style_responsive.css'),
            GlobalUrlService::buildShopStaticUrl('/css/style_default.css'),
            GlobalUrlService::buildShopStaticUrl('/css/By-y/ajax.css'),

//            GlobalUrlService::buildStaticUrl('/css/style_gray.css'),
//            GlobalUrlService::buildStaticUrl('/css/style_navy-blue.css'),
//            GlobalUrlService::buildStaticUrl('/css/style_purple.css'),
        ];
        // 这里注册公共的js都在这里书写.
        $this->js = [
            GlobalUrlService::buildShopStaticUrl('/js/jquery-1.8.3.min.js'),
            GlobalUrlService::buildShopStaticUrl('/css/bootstrap/js/bootstrap.min.js'),
            GlobalUrlService::buildShopStaticUrl('/js/jquery.blockui.js'),
            GlobalUrlService::buildShopStaticUrl('/js/jquery.uniform.min.js'),
            GlobalUrlService::buildShopStaticUrl('/js/scripts.js'),
            GlobalUrlService::buildShopStaticUrl('/js/layer/layer.js'),
            GlobalUrlService::buildShopStaticUrl('/backend/ajax.js'),
            // GlobalUrlService::buildStaticUrl('/css/bootstrap/js/bootstrap-fileupload.js'),
        ];
        parent::registerAssetFiles($view);
    }
}